set the maximum of the "year" property to G_MAXINT >> 8 instead of
authorMichael Natterer <mitch@imendio.com>
Wed, 18 Jun 2008 15:42:27 +0000 (15:42 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Wed, 18 Jun 2008 15:42:27 +0000 (15:42 +0000)
2008-06-18  Michael Natterer  <mitch@imendio.com>

* gtk/gtkcalendar.c: set the maximum of the "year" property to
G_MAXINT >> 8 instead of G_MAXINT to fix overflows in internal
calculations which in turn caused writing beyond the boundaries of
the calendar->day_month[] and day[] arrays which in turn caused a
SEGV. This limits the lifetime of GTK+ to the year 8,388,608 ;)

svn path=/trunk/; revision=20452

ChangeLog
gtk/gtkcalendar.c

index 2583b120644a347b67e97c7a5a83f09c6b209fab..d1e671bf17fe9298ec6b07c3e66af7639aa600d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-06-18  Michael Natterer  <mitch@imendio.com>
+
+       * gtk/gtkcalendar.c: set the maximum of the "year" property to
+       G_MAXINT >> 8 instead of G_MAXINT to fix overflows in internal
+       calculations which in turn caused writing beyond the boundaries of
+       the calendar->day_month[] and day[] arrays which in turn caused a
+       SEGV. This limits the lifetime of GTK+ to the year 8,388,608 ;)
+
 2008-06-18  Michael Natterer  <mitch@imendio.com>
 
        * tests/Makefile.am
index 9db1726fb9b2b5d2d9b9355afee8836242b7fce8..43416c2e02bc685538ee1b5acacd1b865c974e47 100644 (file)
@@ -441,7 +441,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
                                    g_param_spec_int ("year",
                                                     P_("Year"),
                                                     P_("The selected year"),
-                                                    0, G_MAXINT, 0,
+                                                    0, G_MAXINT >> 8, 0,
                                                     GTK_PARAM_READWRITE));
 
   /**